\(\int \cot ^2(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx\) [292]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 100 \[ \int \cot ^2(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {7 a^3 \text {arctanh}(\cos (c+d x))}{8 d}-\frac {4 a^3 \cot ^3(c+d x)}{3 d}-\frac {a^3 \cot ^5(c+d x)}{5 d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{8 d}-\frac {3 a^3 \cot (c+d x) \csc ^3(c+d x)}{4 d} \]

[Out]

7/8*a^3*arctanh(cos(d*x+c))/d-4/3*a^3*cot(d*x+c)^3/d-1/5*a^3*cot(d*x+c)^5/d-1/8*a^3*cot(d*x+c)*csc(d*x+c)/d-3/
4*a^3*cot(d*x+c)*csc(d*x+c)^3/d

Rubi [A] (verified)

Time = 0.17 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {2952, 2691, 3855, 2687, 30, 3853, 14} \[ \int \cot ^2(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {7 a^3 \text {arctanh}(\cos (c+d x))}{8 d}-\frac {a^3 \cot ^5(c+d x)}{5 d}-\frac {4 a^3 \cot ^3(c+d x)}{3 d}-\frac {3 a^3 \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{8 d} \]

[In]

Int[Cot[c + d*x]^2*Csc[c + d*x]^4*(a + a*Sin[c + d*x])^3,x]

[Out]

(7*a^3*ArcTanh[Cos[c + d*x]])/(8*d) - (4*a^3*Cot[c + d*x]^3)/(3*d) - (a^3*Cot[c + d*x]^5)/(5*d) - (a^3*Cot[c +
 d*x]*Csc[c + d*x])/(8*d) - (3*a^3*Cot[c + d*x]*Csc[c + d*x]^3)/(4*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2691

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(a*Sec[e +
 f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Dist[b^2*((n - 1)/(m + n - 1)), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 2952

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \int \left (a^3 \cot ^2(c+d x) \csc (c+d x)+3 a^3 \cot ^2(c+d x) \csc ^2(c+d x)+3 a^3 \cot ^2(c+d x) \csc ^3(c+d x)+a^3 \cot ^2(c+d x) \csc ^4(c+d x)\right ) \, dx \\ & = a^3 \int \cot ^2(c+d x) \csc (c+d x) \, dx+a^3 \int \cot ^2(c+d x) \csc ^4(c+d x) \, dx+\left (3 a^3\right ) \int \cot ^2(c+d x) \csc ^2(c+d x) \, dx+\left (3 a^3\right ) \int \cot ^2(c+d x) \csc ^3(c+d x) \, dx \\ & = -\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}-\frac {3 a^3 \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {1}{2} a^3 \int \csc (c+d x) \, dx-\frac {1}{4} \left (3 a^3\right ) \int \csc ^3(c+d x) \, dx+\frac {a^3 \text {Subst}\left (\int x^2 \left (1+x^2\right ) \, dx,x,-\cot (c+d x)\right )}{d}+\frac {\left (3 a^3\right ) \text {Subst}\left (\int x^2 \, dx,x,-\cot (c+d x)\right )}{d} \\ & = \frac {a^3 \text {arctanh}(\cos (c+d x))}{2 d}-\frac {a^3 \cot ^3(c+d x)}{d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{8 d}-\frac {3 a^3 \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {1}{8} \left (3 a^3\right ) \int \csc (c+d x) \, dx+\frac {a^3 \text {Subst}\left (\int \left (x^2+x^4\right ) \, dx,x,-\cot (c+d x)\right )}{d} \\ & = \frac {7 a^3 \text {arctanh}(\cos (c+d x))}{8 d}-\frac {4 a^3 \cot ^3(c+d x)}{3 d}-\frac {a^3 \cot ^5(c+d x)}{5 d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{8 d}-\frac {3 a^3 \cot (c+d x) \csc ^3(c+d x)}{4 d} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(267\) vs. \(2(100)=200\).

Time = 0.27 (sec) , antiderivative size = 267, normalized size of antiderivative = 2.67 \[ \int \cot ^2(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=a^3 \left (\frac {17 \cot \left (\frac {1}{2} (c+d x)\right )}{30 d}-\frac {\csc ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}-\frac {59 \cot \left (\frac {1}{2} (c+d x)\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{480 d}-\frac {3 \csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {\cot \left (\frac {1}{2} (c+d x)\right ) \csc ^4\left (\frac {1}{2} (c+d x)\right )}{160 d}+\frac {7 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {7 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}+\frac {\sec ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {3 \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {17 \tan \left (\frac {1}{2} (c+d x)\right )}{30 d}+\frac {59 \sec ^2\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{480 d}+\frac {\sec ^4\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{160 d}\right ) \]

[In]

Integrate[Cot[c + d*x]^2*Csc[c + d*x]^4*(a + a*Sin[c + d*x])^3,x]

[Out]

a^3*((17*Cot[(c + d*x)/2])/(30*d) - Csc[(c + d*x)/2]^2/(32*d) - (59*Cot[(c + d*x)/2]*Csc[(c + d*x)/2]^2)/(480*
d) - (3*Csc[(c + d*x)/2]^4)/(64*d) - (Cot[(c + d*x)/2]*Csc[(c + d*x)/2]^4)/(160*d) + (7*Log[Cos[(c + d*x)/2]])
/(8*d) - (7*Log[Sin[(c + d*x)/2]])/(8*d) + Sec[(c + d*x)/2]^2/(32*d) + (3*Sec[(c + d*x)/2]^4)/(64*d) - (17*Tan
[(c + d*x)/2])/(30*d) + (59*Sec[(c + d*x)/2]^2*Tan[(c + d*x)/2])/(480*d) + (Sec[(c + d*x)/2]^4*Tan[(c + d*x)/2
])/(160*d))

Maple [A] (verified)

Time = 0.30 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.46

method result size
parallelrisch \(-\frac {\left (\cot ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )-\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {15 \left (\cot ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {15 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {65 \left (\cot ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-\frac {65 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+20 \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-20 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-70 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )+70 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+140 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right ) a^{3}}{160 d}\) \(146\)
risch \(\frac {a^{3} \left (360 i {\mathrm e}^{8 i \left (d x +c \right )}+15 \,{\mathrm e}^{9 i \left (d x +c \right )}-960 i {\mathrm e}^{6 i \left (d x +c \right )}-390 \,{\mathrm e}^{7 i \left (d x +c \right )}+400 i {\mathrm e}^{4 i \left (d x +c \right )}-320 i {\mathrm e}^{2 i \left (d x +c \right )}+390 \,{\mathrm e}^{3 i \left (d x +c \right )}+136 i-15 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{60 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{5}}+\frac {7 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{8 d}-\frac {7 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{8 d}\) \(158\)
derivativedivides \(\frac {a^{3} \left (-\frac {\cos ^{3}\left (d x +c \right )}{2 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{2}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )-\frac {a^{3} \left (\cos ^{3}\left (d x +c \right )\right )}{\sin \left (d x +c \right )^{3}}+3 a^{3} \left (-\frac {\cos ^{3}\left (d x +c \right )}{4 \sin \left (d x +c \right )^{4}}-\frac {\cos ^{3}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{8}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+a^{3} \left (-\frac {\cos ^{3}\left (d x +c \right )}{5 \sin \left (d x +c \right )^{5}}-\frac {2 \left (\cos ^{3}\left (d x +c \right )\right )}{15 \sin \left (d x +c \right )^{3}}\right )}{d}\) \(185\)
default \(\frac {a^{3} \left (-\frac {\cos ^{3}\left (d x +c \right )}{2 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{2}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )-\frac {a^{3} \left (\cos ^{3}\left (d x +c \right )\right )}{\sin \left (d x +c \right )^{3}}+3 a^{3} \left (-\frac {\cos ^{3}\left (d x +c \right )}{4 \sin \left (d x +c \right )^{4}}-\frac {\cos ^{3}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{8}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+a^{3} \left (-\frac {\cos ^{3}\left (d x +c \right )}{5 \sin \left (d x +c \right )^{5}}-\frac {2 \left (\cos ^{3}\left (d x +c \right )\right )}{15 \sin \left (d x +c \right )^{3}}\right )}{d}\) \(185\)
norman \(\frac {-\frac {a^{3}}{160 d}-\frac {3 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{64 d}-\frac {37 a^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{240 d}-\frac {17 a^{3} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}+\frac {a^{3} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{80 d}+\frac {37 a^{3} \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{80 d}-\frac {37 a^{3} \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{80 d}-\frac {a^{3} \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{80 d}+\frac {17 a^{3} \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}+\frac {37 a^{3} \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{240 d}+\frac {3 a^{3} \left (\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}+\frac {a^{3} \left (\tan ^{16}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{160 d}-\frac {5 a^{3} \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {33 a^{3} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}-\frac {59 a^{3} \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}-\frac {7 a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}\) \(320\)

[In]

int(cos(d*x+c)^2*csc(d*x+c)^6*(a+a*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

-1/160*(cot(1/2*d*x+1/2*c)^5-tan(1/2*d*x+1/2*c)^5+15/2*cot(1/2*d*x+1/2*c)^4-15/2*tan(1/2*d*x+1/2*c)^4+65/3*cot
(1/2*d*x+1/2*c)^3-65/3*tan(1/2*d*x+1/2*c)^3+20*cot(1/2*d*x+1/2*c)^2-20*tan(1/2*d*x+1/2*c)^2-70*cot(1/2*d*x+1/2
*c)+70*tan(1/2*d*x+1/2*c)+140*ln(tan(1/2*d*x+1/2*c)))*a^3/d

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 190 vs. \(2 (90) = 180\).

Time = 0.29 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.90 \[ \int \cot ^2(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {272 \, a^{3} \cos \left (d x + c\right )^{5} - 320 \, a^{3} \cos \left (d x + c\right )^{3} + 105 \, {\left (a^{3} \cos \left (d x + c\right )^{4} - 2 \, a^{3} \cos \left (d x + c\right )^{2} + a^{3}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 105 \, {\left (a^{3} \cos \left (d x + c\right )^{4} - 2 \, a^{3} \cos \left (d x + c\right )^{2} + a^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 30 \, {\left (a^{3} \cos \left (d x + c\right )^{3} - 7 \, a^{3} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )} \sin \left (d x + c\right )} \]

[In]

integrate(cos(d*x+c)^2*csc(d*x+c)^6*(a+a*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

1/240*(272*a^3*cos(d*x + c)^5 - 320*a^3*cos(d*x + c)^3 + 105*(a^3*cos(d*x + c)^4 - 2*a^3*cos(d*x + c)^2 + a^3)
*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 105*(a^3*cos(d*x + c)^4 - 2*a^3*cos(d*x + c)^2 + a^3)*log(-1/2*cos
(d*x + c) + 1/2)*sin(d*x + c) + 30*(a^3*cos(d*x + c)^3 - 7*a^3*cos(d*x + c))*sin(d*x + c))/((d*cos(d*x + c)^4
- 2*d*cos(d*x + c)^2 + d)*sin(d*x + c))

Sympy [F(-1)]

Timed out. \[ \int \cot ^2(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)**2*csc(d*x+c)**6*(a+a*sin(d*x+c))**3,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.55 \[ \int \cot ^2(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {45 \, a^{3} {\left (\frac {2 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 60 \, a^{3} {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} + \log \left (\cos \left (d x + c\right ) + 1\right ) - \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac {240 \, a^{3}}{\tan \left (d x + c\right )^{3}} + \frac {16 \, {\left (5 \, \tan \left (d x + c\right )^{2} + 3\right )} a^{3}}{\tan \left (d x + c\right )^{5}}}{240 \, d} \]

[In]

integrate(cos(d*x+c)^2*csc(d*x+c)^6*(a+a*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

-1/240*(45*a^3*(2*(cos(d*x + c)^3 + cos(d*x + c))/(cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1) - log(cos(d*x + c) +
 1) + log(cos(d*x + c) - 1)) - 60*a^3*(2*cos(d*x + c)/(cos(d*x + c)^2 - 1) + log(cos(d*x + c) + 1) - log(cos(d
*x + c) - 1)) + 240*a^3/tan(d*x + c)^3 + 16*(5*tan(d*x + c)^2 + 3)*a^3/tan(d*x + c)^5)/d

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 196 vs. \(2 (90) = 180\).

Time = 0.41 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.96 \[ \int \cot ^2(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {6 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 45 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 130 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 120 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 840 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 420 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {1918 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 420 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 120 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 130 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 45 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{960 \, d} \]

[In]

integrate(cos(d*x+c)^2*csc(d*x+c)^6*(a+a*sin(d*x+c))^3,x, algorithm="giac")

[Out]

1/960*(6*a^3*tan(1/2*d*x + 1/2*c)^5 + 45*a^3*tan(1/2*d*x + 1/2*c)^4 + 130*a^3*tan(1/2*d*x + 1/2*c)^3 + 120*a^3
*tan(1/2*d*x + 1/2*c)^2 - 840*a^3*log(abs(tan(1/2*d*x + 1/2*c))) - 420*a^3*tan(1/2*d*x + 1/2*c) + (1918*a^3*ta
n(1/2*d*x + 1/2*c)^5 + 420*a^3*tan(1/2*d*x + 1/2*c)^4 - 120*a^3*tan(1/2*d*x + 1/2*c)^3 - 130*a^3*tan(1/2*d*x +
 1/2*c)^2 - 45*a^3*tan(1/2*d*x + 1/2*c) - 6*a^3)/tan(1/2*d*x + 1/2*c)^5)/d

Mupad [B] (verification not implemented)

Time = 10.39 (sec) , antiderivative size = 291, normalized size of antiderivative = 2.91 \[ \int \cot ^2(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {a^3\,\left (6\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-45\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+45\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )-130\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-120\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+420\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-420\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+120\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+130\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+840\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\right )}{960\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5} \]

[In]

int((cos(c + d*x)^2*(a + a*sin(c + d*x))^3)/sin(c + d*x)^6,x)

[Out]

-(a^3*(6*cos(c/2 + (d*x)/2)^10 - 6*sin(c/2 + (d*x)/2)^10 - 45*cos(c/2 + (d*x)/2)*sin(c/2 + (d*x)/2)^9 + 45*cos
(c/2 + (d*x)/2)^9*sin(c/2 + (d*x)/2) - 130*cos(c/2 + (d*x)/2)^2*sin(c/2 + (d*x)/2)^8 - 120*cos(c/2 + (d*x)/2)^
3*sin(c/2 + (d*x)/2)^7 + 420*cos(c/2 + (d*x)/2)^4*sin(c/2 + (d*x)/2)^6 - 420*cos(c/2 + (d*x)/2)^6*sin(c/2 + (d
*x)/2)^4 + 120*cos(c/2 + (d*x)/2)^7*sin(c/2 + (d*x)/2)^3 + 130*cos(c/2 + (d*x)/2)^8*sin(c/2 + (d*x)/2)^2 + 840
*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*cos(c/2 + (d*x)/2)^5*sin(c/2 + (d*x)/2)^5))/(960*d*cos(c/2 + (d*x)
/2)^5*sin(c/2 + (d*x)/2)^5)